/**
 * 
 * If you have edited the file, please update
 * all the last-modified fields manually. Thanks!
 *
 * @last-modified by: 
 * @last-modified date: 
 * @last-modified time: 
 *
 * @author Swee Zhi
 * @date-created Sep 7, 2011    @time-created 3:13:51 AM
 *
 * @project: 
 * @module: 
 * @institution: 
 *
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;

@Entity(name="TouristAcct")
public class TouristAccountEntity extends UserAccountEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @OneToOne(cascade={CascadeType.PERSIST})
    private TouristEntity tourist;

    public TouristAccountEntity() {
        super();
    }
    
    public void create(String username, String password, Date creationDate) {
        super.setUsername(username);
        super.setPassword(password);
        super.setCreationDate(creationDate);
    }
    
    public void update(String password) {
        super.setPassword(password);
    }

    public TouristEntity getTourist() {
        return tourist;
    }

    public void setTourist(TouristEntity tourist) {
        this.tourist = tourist;
    }
    
    
    
}
